a = int(input(),16)
print(a)
